import { useDispatch } from 'react-redux';
type tt = 'success' | 'info' | 'warning' | 'error'
function useToast() {
    let dispatch = useDispatch()
    return (type: tt, message: string) => {
        dispatch({
            type: "showToast",
            value: {
                type: type,
                message: message
            }
        })
    }
}
export {
    useToast
}